ghacks-clear-all-up-to-57-[the-rest-inactive].js 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. /***
  2. This will reset EVERYTHING that is INACTIVE in the ghacks user.js
  3. release 57-alpha master, but excludes the following:
  4. - prefs removed since publishing on github
  5. - e10s section 1100
  6. - privacy.resistFingerprinting alternatives sections 4600 & 4700
  7. - deprecated section 9999
  8. It does not matter if you clear everything, as a restart will reapply your user.js
  9. Total 477 prefs from 57-alpha master: 118 inactive, 359 active
  10. These have been broken into two scripts for convenience
  11. For instructions see:
  12. https://github.com/ghacksuserjs/ghacks-user.js/wiki/1.6-Bulk-Pref-Resetting-[Scratchpad]
  13. ***/
  14. (function() {
  15. let ops = [
  16. /* 119 INACTIVE prefs in 57-alpha master */
  17. 'accessibility.typeaheadfind',
  18. 'app.update.enabled',
  19. 'browser.cache.memory.capacity',
  20. 'browser.cache.memory.enable',
  21. 'browser.chrome.favicons',
  22. 'browser.chrome.site_icons',
  23. 'browser.download.autohideButton',
  24. 'browser.privatebrowsing.autostart',
  25. 'browser.safebrowsing.allowOverride',
  26. 'browser.safebrowsing.blockedURIs.enabled',
  27. 'browser.safebrowsing.downloads.enabled',
  28. 'browser.safebrowsing.downloads.remote.block_dangerous',
  29. 'browser.safebrowsing.downloads.remote.block_dangerous_host',
  30. 'browser.safebrowsing.downloads.remote.block_potentially_unwanted',
  31. 'browser.safebrowsing.downloads.remote.block_uncommon',
  32. 'browser.safebrowsing.malware.enabled',
  33. 'browser.safebrowsing.phishing.enabled',
  34. 'browser.safebrowsing.provider.google.gethashURL',
  35. 'browser.safebrowsing.provider.google.updateURL',
  36. 'browser.safebrowsing.provider.google4.gethashURL',
  37. 'browser.safebrowsing.provider.google4.updateURL',
  38. 'browser.safebrowsing.provider.mozilla.gethashURL',
  39. 'browser.safebrowsing.provider.mozilla.updateURL',
  40. 'browser.sessionhistory.max_total_viewers',
  41. 'browser.startup.page',
  42. 'browser.stopReloadAnimation.enabled',
  43. 'browser.storageManager.enabled',
  44. 'browser.tabs.loadBookmarksInTabs',
  45. 'browser.urlbar.autocomplete.enabled',
  46. 'browser.urlbar.maxRichResults',
  47. 'clipboard.autocopy',
  48. 'dom.event.contextmenu.enabled',
  49. 'dom.indexedDB.enabled',
  50. 'dom.presentation.controller.enabled',
  51. 'dom.presentation.discoverable',
  52. 'dom.presentation.discovery.enabled',
  53. 'dom.presentation.enabled',
  54. 'dom.presentation.receiver.enabled',
  55. 'dom.presentation.session_transport.data_channel.enable',
  56. 'dom.storage.enabled',
  57. 'dom.storageManager.enabled',
  58. 'dom.vr.enabled',
  59. 'extensions.screenshots.disabled',
  60. 'extensions.systemAddon.update.url',
  61. 'extensions.update.enabled',
  62. 'font.name.monospace.x-unicode',
  63. 'font.name.monospace.x-western',
  64. 'font.name.sans-serif.x-unicode',
  65. 'font.name.sans-serif.x-western',
  66. 'font.name.serif.x-unicode',
  67. 'font.name.serif.x-western',
  68. 'font.system.whitelist',
  69. 'full-screen-api.warning.delay',
  70. 'full-screen-api.warning.timeout',
  71. 'general.autoScroll',
  72. 'geo.wifi.logging.enabled',
  73. 'gfx.direct2d.disabled',
  74. 'javascript.options.baselinejit',
  75. 'javascript.options.ion',
  76. 'media.flac.enabled',
  77. 'media.mediasource.enabled',
  78. 'media.mediasource.mp4.enabled',
  79. 'media.mediasource.webm.audio.enabled',
  80. 'media.mediasource.webm.enabled',
  81. 'media.mp4.enabled',
  82. 'media.ogg.enabled',
  83. 'media.ogg.flac.enabled',
  84. 'media.opus.enabled',
  85. 'media.raw.enabled',
  86. 'media.wave.enabled',
  87. 'media.webm.enabled',
  88. 'media.wmf.amd.vp9.enabled',
  89. 'media.wmf.enabled',
  90. 'media.wmf.vp9.enabled',
  91. 'network.cookie.lifetime.days',
  92. 'network.cookie.lifetimePolicy',
  93. 'network.dns.disableIPv6',
  94. 'network.dnsCacheEntries',
  95. 'network.dnsCacheExpiration',
  96. 'network.http.fast-fallback-to-IPv4',
  97. 'offline-apps.quota.warn',
  98. 'permissions.memory_only',
  99. 'places.history.enabled',
  100. 'plugin.state.flash',
  101. 'privacy.clearOnShutdown.openWindows',
  102. 'privacy.cpd.downloads',
  103. 'privacy.cpd.openWindows',
  104. 'privacy.resistFingerprinting.block_mozAddonManager',
  105. 'privacy.trackingprotection.annotate_channels',
  106. 'privacy.trackingprotection.enabled',
  107. 'privacy.trackingprotection.lower_network_priority',
  108. 'privacy.trackingprotection.pbmode.enabled',
  109. 'privacy.usercontext.about_newtab_segregation.enabled',
  110. 'privacy.userContext.enabled',
  111. 'privacy.userContext.longPressBehavior',
  112. 'privacy.userContext.ui.enabled',
  113. 'privacy.window.maxInnerHeight',
  114. 'privacy.window.maxInnerWidth',
  115. 'reader.parse-on-load.enabled',
  116. 'security.mixed_content.block_display_content',
  117. 'security.nocertdb',
  118. 'security.ssl.require_safe_negotiation',
  119. 'security.ssl3.dhe_rsa_aes_128_sha',
  120. 'security.ssl3.dhe_rsa_aes_256_sha',
  121. 'security.ssl3.ecdhe_ecdsa_aes_128_sha',
  122. 'security.ssl3.ecdhe_rsa_aes_128_sha',
  123. 'security.ssl3.rsa_aes_128_sha',
  124. 'security.ssl3.rsa_aes_256_sha',
  125. 'security.ssl3.rsa_des_ede3_sha',
  126. 'services.blocklist.addons.collection',
  127. 'services.blocklist.gfx.collection',
  128. 'services.blocklist.onecrl.collection',
  129. 'services.blocklist.plugins.collection',
  130. 'signon.rememberSignons',
  131. 'svg.disabled',
  132. 'toolkit.cosmeticAnimations.enabled',
  133. 'urlclassifier.trackingTable',
  134. 'xpinstall.signatures.required',
  135. /* reset parrot: check your open about:config after running the script */
  136. '_user.js.parrot'
  137. ]
  138. if("undefined" === typeof(Services)) {
  139. alert("about:config needs to be the active tab!");
  140. return;
  141. }
  142. let c = 0;
  143. for (let i = 0, len = ops.length; i < len; i++) {
  144. if (Services.prefs.prefHasUserValue(ops[i])) {
  145. Services.prefs.clearUserPref(ops[i]);
  146. if (!Services.prefs.prefHasUserValue(ops[i])) {
  147. console.log("reset", ops[i]);
  148. c++;
  149. } else { console.log("failed to reset", ops[i]); }
  150. }
  151. }
  152. focus();
  153. let d = (c==1) ? " pref" : " prefs";
  154. if (c > 0) {
  155. alert("successfully reset " + c + d + "\n\nfor details check the Browser Console (Ctrl+Shift+J)");
  156. } else { alert("nothing to reset"); }
  157. })();